package org.example.memora.common.utils;
import org.example.memora.DTO.UserRedisDTO;

public class UserHolder {
    private static final ThreadLocal<UserRedisDTO> tl = new ThreadLocal<>();

    public static void saveUser(UserRedisDTO user){
        tl.set(user);
    }

    public static UserRedisDTO getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}

